﻿package com.ease.integration.service
{
	import com.obas.flex.common.proxy.DefaultServiceProxy;

	public class ExternalServiceDispatcher extends DefaultServiceProxy
	{
    	private static const SERVICE_NAME:String = "externalServiceDispatcher";

  		public function ExternalServiceDispatcher() {
     		super(SERVICE_NAME);
  		}

		/**
    * 
<p>
根据context把请求分派到相应service
<p>
由service调用外部服务 由于classloader的原因,返回类型设为Object


    * 
    * @param serviceIntegrationContext 
    * @return  
    */
		public function 
			/* flex: Object */ 
			/* java: java.util.Map */
		doService(
 			classReferenceKeyName:String  /* java.lang.String */,
 			beanMethodName:String  /* java.lang.String */,
 			serviceKey:String  /* java.lang.String */,
 			externalServiceName:String  /* java.lang.String */,
 			requestMap:Object  /* java.util.Map<java.lang.String,java.lang.Object> */,
 			callback:Function = null,
 			context:Object = null
 			):void {
    		callService("doService", [classReferenceKeyName, beanMethodName, serviceKey, externalServiceName, requestMap], callback, context);
 		}

		/**
    */
		public function 
			/* flex: Object */ 
			/* java: java.util.Map */
		doRemoteService(
 			classReferenceKeyName:String  /* java.lang.String */,
 			beanMethodName:String  /* java.lang.String */,
 			serviceKey:String  /* java.lang.String */,
 			externalServiceName:String  /* java.lang.String */,
 			requestMap:Object  /* java.util.Map<java.lang.String,java.lang.Object> */,
 			callback:Function = null,
 			context:Object = null
 			):void {
    		callService("doRemoteService", [classReferenceKeyName, beanMethodName, serviceKey, externalServiceName, requestMap], callback, context);
 		}
	}
}